package Thread;

public class ThreadDemo01 {
    class MyThread01 extends Thread {
        public void run() {
            for (int i = 0; i < 100; i++) {
                System.out.println(Thread.currentThread().getName() + ":" + i);
            }
        }
    }
    class MyThread02 extends Thread {
        public void run() {
            for (int i = 0; i < 100; i++) {
                System.out.println(Thread.currentThread().getName() + ":" + i);
            }
        }
    }


    public static void main(String[] args) {
        ThreadDemo01 td = new ThreadDemo01();
        MyThread01 t1 = td.new MyThread01();
        MyThread02 t2 = td.new MyThread02();
        t1.start();
        t2.start();
    }
}
